﻿using Snowflake.Core;

namespace Commons.DomainBase
{
    public class IdWorkerHelper
    {
        private static readonly Lazy<IdWorker> _instance = new Lazy<IdWorker>(() => new IdWorker(1, 1));
        public static IdWorker Instance => _instance.Value;
        public static long NextId()
        {
            // 实现雪花ID生成算法  
            // ...  
            return _instance.Value.NextId(); // 这里返回一个示例值，你需要替换为实际的生成逻辑  
        }
    }
}
